import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Card, Image } from 'antd';
import ProForm, { ProFormText } from '@ant-design/pro-form';
import { useModel } from '@@/plugin-model/useModel';
import { ethers } from 'ethers';

export default (): React.ReactNode => {
  const { initialState } = useModel('@@initialState');
  const provider = initialState?.provider;
  const signer = provider?.getSigner();

  return (
    <PageContainer>
      <div>
        <Image width={1000} src="" />
      </div>
      {/*{'未登录可见'}*/}
      {/*<ProForm*/}
      {/*  onFinish={async (value) => {*/}
      {/*    const address = await signer?.getAddress();*/}

      {/*    let val = value.test as string;*/}
      {/*    let messageHash = ethers.utils.id(val);*/}
      {/*    console.log(messageHash);*/}
      {/*    let messageHashBytes = ethers.utils.arrayify(messageHash);*/}
      {/*    console.log(messageHashBytes);*/}
      {/*    let flatSig = await signer?.signMessage(messageHashBytes);*/}
      {/*    console.log(flatSig);*/}
      {/*  }}*/}
      {/*>*/}
      {/*  <ProFormText name="test"></ProFormText>*/}
      {/*</ProForm>*/}
    </PageContainer>
  );
};
